﻿package mortal.game.view.mining.render
{
    import Message.Game.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import extend.language.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.item.*;

    public class MiningBeRefleshRender extends NoSkinCellRenderer
    {
        private var _txtName:GTextFiled;
        private var _line:ScaleBitmap;
        private var _myData:STaskRoutineTaskRefreshInfo;

        public function MiningBeRefleshRender()
        {
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            this._myData = param1 as STaskRoutineTaskRefreshInfo;
            var _loc_2:* = this._myData.name;
            _loc_2 = _loc_2.replace("\n", "");
            var _loc_3:* = ColorConfig.instance.getItemColor((this._myData.color - 1));
            var _loc_4:* = ColorConfig.instance.getItemColor(Math.max(0, (this._myData.oldcolor - 1)));
            if (this._myData.type == 2)
            {
                this._txtName.htmlText = Language.getStringByParam(21034, _loc_2, _loc_4.color, _loc_4.colorText, _loc_3.color, _loc_3.colorText);
            }
            else
            {
                this._txtName.htmlText = Language.getStringByParam(21035, _loc_2, this._myData.count, _loc_4.color, _loc_4.colorText, _loc_3.color, _loc_3.colorText);
            }
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            var _loc_1:* = GlobalStyle.textFormatPutong;
            _loc_1.size = 13;
            this._txtName = UIFactory.gTextField("", 8, 0, 300, 50, this, _loc_1);
            this._txtName.multiline = true;
            this._txtName.wordWrap = true;
            this._txtName.textColor = 16777215;
            this._line = UIFactory.bg(-20, 47, 315, 2, this, ImagesConst.SplitLine);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._txtName.dispose(param1);
            this._txtName = null;
            this._line.dispose(param1);
            this._line = null;
            return;
        }// end function

    }
}
